import 'package:flutter/material.dart';
import 'package:moose_app/core/utils/navigate_util.dart';
import 'package:moose_app/ui/screens/main/main_screen.dart';
import 'package:moose_app/ui/values/values.dart';

import 'back_choose_item.dart';

class ATHBackChooseBody extends StatefulWidget {
  @override
  _ATHBackChooseBodyState createState() => _ATHBackChooseBodyState();
}

class _ATHBackChooseBodyState extends State<ATHBackChooseBody> {
  @override
  Widget build(BuildContext context) {
    return Container(
      margin: EdgeInsets.symmetric(horizontal: kSize20),
      child: Column(
        children: [
          Row(
            mainAxisAlignment: MainAxisAlignment.end,
            children: [
              GestureDetector(
                onTap: () {
                  ATHNavigator.pushReplace(context, ATHMainScreen.routeName,
                      clearStack: true);
                },
                child: Container(
                    margin: EdgeInsets.only(right: kSize20, top: kSize20),
                    child: Text(
                      "跳过",
                      style:
                          TextStyle(fontSize: kFontSize28, color: Colors.black),
                    )),
              )
            ],
          ),
          Column(
            children: [
              Container(
                margin: EdgeInsets.only(top: kSize10),
                child: Text(
                  "好久不见，欢迎回来",
                  style: TextStyle(
                      fontSize: kFontSize46,
                      color: Colors.black,
                      fontWeight: FontWeight.bold),
                ),
              ),
              Container(
                margin: EdgeInsets.only(top: kSize8),
                child: Text(
                  "选择你近期感兴趣的内容",
                  style: TextStyle(fontSize: kSize30, color: kColor66),
                ),
              )
            ],
          ),
          Expanded(
            child: Container(
              margin: EdgeInsets.only(top: kSize20),
              child: GridView.builder(
                shrinkWrap: true,
                itemCount: 18,
                itemBuilder: (context, index) {
                  return ATHBackChooseItem();
                },
                gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
                  crossAxisCount: 3,
                  mainAxisSpacing: kSize16,
                  crossAxisSpacing: kSize16,
                  childAspectRatio: 1 / 1.46,
                ),
              ),
            ),
          )
        ],
      ),
    );
  }
}
